package com.wesley;

import com.alibaba.druid.pool.DruidDataSource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;

import javax.sql.DataSource;

/**
 * created by wei xin on 2020/3/3 0003
 */
//@EnableEurekaClient
@EnableDiscoveryClient
@SpringBootApplication
public class TestServer2Application {


    public static void main(String[] args) {

        SpringApplication.run(TestServer2Application.class);

    }


    @Bean
    @ConfigurationProperties(prefix = "spring.datasource")
    public DataSource dataSource() {
        DruidDataSource druidDataSource = new DruidDataSource();
        return druidDataSource;
    }



}
